package week06.PersonCmp;

public abstract class AbstratPersonCmb {
  protected abstract int compare(Person p1,Person p2);

  public void sort(Person[] people) {
    for (int i = 0; i < people.length - 1; i++) {
      for (int j = 0; j < people.length; j++) {
          if (compare(people[i],people[j])<0){
            Person tmp=people[i];
            people[i]=people[j];
            people[j]=tmp;
          }
      }
    }
  }
}
